//
//  PrepayCalculator.h
//  Rong360
//
//  Created by tianliwei on 16/2/14.
//  Copyright (c) 2014 tianliwei. All rights reserved.
//

typedef enum{
    YueGongAlways,//月供不变
    QiXianAlways//期限不变
}HuanKuanType;

typedef enum {
    PrePayAll,//偿还全部
    PrePayPart//偿还部分
}PrepayType;

#import <Foundation/Foundation.h>

@interface PrepayCalculator : NSObject

@property (nonatomic, assign)PrepayType prepayType;

//偿还全部
@property (nonatomic, copy)NSString *dkze_all;
@property (nonatomic, copy)NSString *deadline_all;
@property (nonatomic, copy)NSString *dkll_all;
@property (nonatomic, strong)NSDate *firstPay_all;
@property (nonatomic, strong)NSDate *prePay_all;

//偿还部分
@property (nonatomic, copy)NSString *dkze_part;
@property (nonatomic, copy)NSString *tqhq_part;
@property (nonatomic, copy)NSString *deadline_part;
@property (nonatomic, copy)NSString *dkll_part;
@property (nonatomic, strong)NSDate *firstPay_part;
@property (nonatomic, strong)NSDate *prePay_part;
@property (nonatomic, assign)HuanKuanType hkType;

//结果
@property (nonatomic, copy)NSString *cmonth;//该月总还款额
@property (nonatomic, copy)NSString *cmonth_new;//新月还款额
@property (nonatomic, copy)NSString *cmonth_old;//原月还款额
@property (nonatomic, copy)NSString *crate_saved;//节省利息
@property (nonatomic, copy)NSString *true_Date;//新最后还款期
@property (nonatomic, copy)NSString *plan_Date;//原最后还款期
@property (nonatomic, copy)NSString *ratePayed;//已还利息
@property (nonatomic, copy)NSString *totalPayed;//已还总额

@property (nonatomic, strong)NSArray *results;

- (void)beginCalculateWithPrepayType:(PrepayType)type;
@end
